package com.itheima.string;

import java.util.Scanner;

public class StringBuilderDemo2 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一个字符串");
        String str = sc.next();

        // 链式编程
        String result = new StringBuilder(str).reverse().toString();

        System.out.println(str.equals(result)? "对称字符串":"非对称字符串");
    }
}
